package com.Jin.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Comparator;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class CarPlate {
    private int id;
    private String owner;       //拥有者
    private String account;     //账号
    private String licenseNum;  //车牌号
    private String number;      //电话号
    private String carType;
    private String status;      //业务申请状态

    //比较规则
    public static class Comparators{
        public static Comparator<CarPlate> ID = new Comparator<CarPlate>() {
            @Override
            public int compare(CarPlate a, CarPlate b) {
                return Integer.compare(a.id, b.id);
            }
        };

        public static Comparator<CarPlate> STATUS = new Comparator<CarPlate>() {
            @Override
            public int compare(CarPlate a, CarPlate b) {
                return a.status.compareTo(b.status);
            }
        };
    }

    // 2,1,0,申请成功，申请中，申请失败
    // 2,1,0,销毁成功，销毁中，销毁失败
}
